package com.symone.webcms.common;

public enum ResultCode {

    SUCCESS(0,"success"),               //一般成功代码
    FAILD(10100,"failed"),                  //一般错误代码
    NoLogin(10001,"您还未登录，请先登录"),
    NoPermission(10002,"您没有此权限，请联系管理员"),
    PermissionError(10120,"权限错误！"),
    UnknownAccountError(10121,"账号不存在"),
    IncorrectPasswordError(10122,"密码不正确"),
    KptchaValidateFailed(10123,"验证码错误"),
    LockedAccountError(10124,"帐号被锁定"),
    ExcessiveAttemptsError(10125,"登录失败次数过多"),
    DisabledAccountError(10126,"帐号被禁用"),
    AuthenticationError(10127,"认证失败"),
    UnauthenticatedError(10128,"用户认证错误"),
    UnauthorizedError(10129,"用户授权失败"),
    InvalidLoginType(10129,"非法的登录模式");

    private int code;
    private String msg;

    private ResultCode(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code){
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg){
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "code:" + this.code + " ,message:" + this.msg;
    }
}
